package demo;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

//Day11
public class Day21002 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        File file = new File("1.txt");
        try {
            FileWriter fileWriter = new FileWriter(file);
            for (int i = 0; i < 3; i++) {
                System.out.println("输入第"+(i+1)+"人信息");
                fileWriter.write(scanner.nextLine()+"\n");
            }
            fileWriter.close();
        } catch (IOException e) {
            System.out.println(e);
        }


    }
}
